package jamirr;

public interface BeanReference<B> extends Named {

    /**
     * @return Is the mirror present?
     */
    boolean isPresent();

    /**
     * The type. The method {@link #isPresent()} should be checked first.
     *
     * @return The type
     * @throws MirrorException if the mirror cannot be loaded
     */
    Class<B> getBeanType();

    /**
     * Loads the mirror.
     *
     * @return The loaded mirror.
     * @throws MirrorException if the mirror cannot be loaded
     */
    BeanMirror<B> load();
}
